package wu2020.top.spring.boot.flyway.simple.application;

import com.wu.framework.response.Result;
import com.wu.framework.response.ResultFactory;
import wu2020.top.spring.boot.flyway.simple.domain.model.person.Person;
import wu2020.top.spring.boot.flyway.simple.application.command.person.PersonRemoveCommand;
import wu2020.top.spring.boot.flyway.simple.application.command.person.PersonStoryCommand;
import wu2020.top.spring.boot.flyway.simple.application.command.person.PersonUpdateCommand;
import wu2020.top.spring.boot.flyway.simple.application.command.person.PersonQueryListCommand;
import wu2020.top.spring.boot.flyway.simple.application.command.person.PersonQueryOneCommand;
import wu2020.top.spring.boot.flyway.simple.application.dto.PersonDTO;
import java.util.List;
import com.wu.framework.inner.lazy.database.expand.database.persistence.domain.LazyPage;
/**
 * describe person 
 *
 * @author Jia wei Wu
 * @date 2024/03/07 09:59 上午
 * @see com.wu.framework.inner.lazy.persistence.reverse.lazy.ddd.DefaultDDDLazyApplication 
 **/

public interface PersonApplication {


    /**
     * describe 新增
     *
     * @param personStoryCommand 新增     
     * @return {@link Result<Person>} 新增后领域对象     
     
     * @author Jia wei Wu
     * @date 2024/03/07 09:59 上午
     **/

    Result<Person> story(PersonStoryCommand personStoryCommand);

    /**
     * describe 批量新增
     *
     * @param personStoryCommandList 批量新增     
     * @return {@link Result<List<Person>>} 新增后领域对象集合     
     
     * @author Jia wei Wu
     * @date 2024/03/07 09:59 上午
     **/

    Result<List<Person>> batchStory(List<PersonStoryCommand> personStoryCommandList);

    /**
     * describe 更新
     *
     * @param personUpdateCommand 更新     
     * @return {@link Result<Person>} 领域对象     
     
     * @author Jia wei Wu
     * @date 2024/03/07 09:59 上午
     **/

    Result<Person> updateOne(PersonUpdateCommand personUpdateCommand);

    /**
     * describe 查询单个
     *
     * @param personQueryOneCommand 查询单个     
     * @return {@link Result<PersonDTO>} DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/03/07 09:59 上午
     **/

    Result<PersonDTO> findOne(PersonQueryOneCommand personQueryOneCommand);

    /**
     * describe 查询多个
     *
     * @param personQueryListCommand 查询多个     
     * @return {@link Result <List<PersonDTO>>} DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/03/07 09:59 上午
     **/

    Result <List<PersonDTO>> findList(PersonQueryListCommand personQueryListCommand);

    /**
     * describe 分页查询多个
     *
     * @param personQueryListCommand 分页查询多个     
     * @return {@link Result <LazyPage<PersonDTO>>} 分页DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/03/07 09:59 上午
     **/

    Result <LazyPage<PersonDTO>> findPage(int size,int current,PersonQueryListCommand personQueryListCommand);

    /**
     * describe 删除
     *
     * @param personRemoveCommand 删除     
     * @return {@link Result<Person>}      
     
     * @author Jia wei Wu
     * @date 2024/03/07 09:59 上午
     **/

    Result<Person> remove(PersonRemoveCommand personRemoveCommand);

}